@import '../../style/variables.less';

@filter-gap: 8px;

.@{prefix}-filterbar {
    display: flex;
    align-items: flex-start;
    min-height: 30px;
    padding-top: 6px;
    flex-grow: 1;
    .filter-label {
        white-space: nowrap;
    }

    .flex-1 {
        flex: 1;
        max-width: 800px;
    }

    .content {
        display: flex;
        align-items: flex-start;
        flex-wrap: nowrap;
        overflow: hidden;
        margin-top: -10px;

        .filters-wrapper {
            display: flex;
            overflow-x: auto;
            padding-bottom: 10px;
        }

        &.expanded {
            flex-wrap: wrap;
        }

        .filter {
            display: flex;
            margin-right: @filter-gap;
            padding: 1px 25px 1px 8px;
            border: 1px solid #e1e1e1;
            border-radius: 0px;
            color: #555;
            position: relative;
            margin-top: 8px;
            flex: none;

            &.custom {
                flex-shrink: 0;
                cursor: pointer;
                padding-right: 8px;
            }

            &-label {
                color: @weak-text-color;
                margin-right: 5px;
                font-weight: normal;
            }

            &-text {
                max-width: 160px;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
            }

            &-close {
                position: absolute;
                cursor: pointer;
                color: @maycur-color;
                width: 20px;
                height: 20px;
                right: 3px;
                font-weight: 700;
                top: 0;
                bottom: 0;
                margin: auto 0;
                line-height: 20px;
                font-size: 10px;
                text-align: center;
            }
        }

        // .filter+.filter {
        //     margin-left: @filter-gap;
        // }

        .filter-clear {
            margin-left: @filter-gap;
            margin-top: 8px;

            .maycur-btn {
                border: 1px solid #eee;
                border-radius: 0px;
                background: #f7f7f7;
                color: @maycur-color;
                box-shadow: none;
            }
        }

        .filter-data-state,
        .filter-set-btn {
            flex-shrink: 0;
        }

        .filter-data-state {
            margin-left: 4px;
            margin-top: 10px;

            &_num {
                color: @maycur-color;
                margin: 0 4px;
            }
        }

        .filter-set-btn {
            display: flex;
            align-items: center;
            color: @maycur-color;
            cursor: pointer;
            font-size: 14px;
            margin: 7px 10px 0;

            &.fm:before {
                font-size: 16px;
                margin-right: 2px;
            }
        }
    }

    .filter-arrow {
        margin: 0 15px 0 5px;
        color: @maycur-color;
        cursor: pointer;
    }

    .filter-arrow,
    .filter-label {
        flex-shrink: 0;
    }
}